#ifndef pfc_common_h
#define pfc_common_h

#include <stdio.h>
#include <stdint.h>

typedef struct PFC_info {
    char     name[32];     
    uint32_t manufacturerID;
    float    readVolt_f;
    float    readCurr_f;
    uint8_t  setSwitch;
    uint8_t  getSwitch;
    float    writeVolt_f;
    float    writeCurr_f;
    uint8_t  pfc_State;
} PFC_info;

typedef enum {
    PFC_STATE_ON = 0,
    PFC_STATE_OFF,
} pfc_switch_e;

int pfc_init(void);
int pfc_send_switch(uint8_t sw);
int pfc_send_voltage(float volt);
int pfc_send_current(float curr);
int pfc_send_status(uint8_t status);
float get_pfc_read_voltage(void);
float get_pfc_read_current(void);
float get_pfc_write_voltage(void);
float get_pfc_write_current(void);
void pfc_rx_dispatch(struct CAN_MSGID_T* msg);
#endif // !pfc_common_h
